<template>
  <div>
    <!--  default-active :　默认选中的菜单
            :router="true" true表示开启路由模式,开启之后, index值代表的就是路由地址
    -->
    <el-menu
      :router="true"
      :default-active="$route.path"
      class="el-menu-vertical-demo"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b"
    >
      <el-menu-item-group>
        <span slot="title" class="span-font-size">秒杀专区</span>
        <el-menu-item index="/operation/secondsKillActivity">
          <i class="el-icon-s-home"></i>
          <span slot="title">秒杀活动列表</span>
        </el-menu-item>
        <el-menu-item index="/operation/periodTime">
          <i class="el-icon-user-solid"></i>
          <span slot="title">时间段列表</span>
        </el-menu-item>
      </el-menu-item-group>
      <el-menu-item-group>
        <span slot="title" class="span-font-size">满减专区</span>
        <el-menu-item index="/operation/withReducedActivity">
          <i class="el-icon-user"></i>
          <span slot="title">满减活动列表</span>
        </el-menu-item>
        <el-menu-item index="/operation/addWithReducedActivity">
          <i class="el-icon-user"></i>
          <span slot="title">添加满减活动</span>
        </el-menu-item>
      </el-menu-item-group>
      <el-menu-item-group>
        <span slot="title" class="span-font-size">优惠卷管理</span>
        <el-menu-item index="/operation/coupon">
          <i class="el-icon-user"></i>
          <span slot="title">优惠卷列表</span>
        </el-menu-item>
        <el-menu-item index="/operation/addCoupon">
          <i class="el-icon-user"></i>
          <span slot="title">添加优惠卷</span>
        </el-menu-item>
        <el-menu-item index="/operation/selectCoupon">
          <i class="el-icon-user"></i>
          <span slot="title">优惠卷查询</span>
        </el-menu-item>
      </el-menu-item-group>
      <el-menu-item-group>
        <span slot="title" class="span-font-size">活动管理</span>
        <el-menu-item index="/operation/activity">
          <i class="el-icon-user"></i>
          <span slot="title">活动列表</span>
        </el-menu-item>
        <el-menu-item index="/operation/addActivity">
          <i class="el-icon-user"></i>
          <span slot="title">添加活动</span>
        </el-menu-item>
      </el-menu-item-group>
      <el-menu-item-group>
        <span slot="title" class="span-font-size">广告管理</span>
        <el-menu-item index="/operation/advertising">
          <i class="el-icon-user"></i>
          <span slot="title">广告列表</span>
        </el-menu-item>
        <el-menu-item index="/operation/addAdvertising">
          <i class="el-icon-user"></i>
          <span slot="title">添加广告</span>
        </el-menu-item>
      </el-menu-item-group>
    </el-menu>
  </div>
</template>


<style scoped>
.span-font-size {
  font-size: 16px;
}
.el-menu {
  border-right: none;
}
</style>